package o;

import android.content.Context;
import com.huawei.hms.support.api.entity.pay.HwPayConstant;
import java.io.File;
import java.util.LinkedHashMap;
import java.util.Map;
import o.bjy.c;
import org.json.JSONObject;

public class dfs {
    public static boolean ˋ(Context context, final File file, final String str, final String str2) {
        return new drz().ˏ(file, new dsf() {
            public Map<String, String> ॱ(String str) {
                Map<String, String> linkedHashMap = new LinkedHashMap();
                Logger.ˏ("FeedbackReport", "start genParams...");
                String valueOf = String.valueOf(System.currentTimeMillis());
                String str2 = "";
                try {
                    str2 = bkq.ˊ(bkn.ॱ(bjx.ˏ()), true);
                } catch (SecurityException e) {
                    Logger.e("FeedbackReport", "logreport Exception");
                }
                ˎ(linkedHashMap, "logId", str2);
                if (file != null) {
                    ˎ(linkedHashMap, "logfileName", str);
                }
                ˎ(linkedHashMap, "method", dfm.APIMETHOD);
                ˎ(linkedHashMap, HwPayConstant.KEY_SIGN, HcridSession.ˋ().ˊ());
                ˎ(linkedHashMap, "ts", valueOf);
                ˎ(linkedHashMap, "desc", str);
                ˎ(linkedHashMap, "appId", str2);
                ˎ(linkedHashMap, "clientPackage", ContentManager.getInstant().getContext().getPackageName());
                c ॱ = new bjy(ContentManager.getInstant().getContext()).ॱ();
                ˎ(linkedHashMap, "deviceId", ॱ.ˎ);
                ˎ(linkedHashMap, "deviceIdType", String.valueOf(ॱ.ॱ));
                try {
                    ˎ(linkedHashMap, "authorization", epk.ˏ().toJson());
                } catch (Exception e2) {
                    Logger.e("FeedbackReport", e2.toString());
                }
                return linkedHashMap;
            }

            public boolean ˏ(String str) {
                try {
                    if (new JSONObject(str).getInt("rtnCode") == 0) {
                        return true;
                    }
                    return false;
                } catch (Exception e) {
                    Logger.ˋ("FeedbackReport", "LogReport Exception");
                    return false;
                }
            }

            public String ˊ() {
                return cvx.ˎ("server.store") + "clientApi";
            }
        });
    }
}
